//  Copyright (c) 2018-present, Cruise LLC
//
//  This source code is licensed under the Apache License, Version 2.0,
//  found in the LICENSE file in the root directory of this source tree.
//  You may not use this file except in compliance with the License.
@import "~webviz-core/src/styles/colors.module.scss";

.root {
  height: 100%;
  position: relative;
}

.canvas {
  min-width: 0;
  min-height: 0;
  object-position: top left;
}

.bottom-bar {
  transition: opacity 0.1s ease-in-out;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  background-color: transparent;
  text-align: right;

  position: absolute;
  right: 4px;
  padding-right: 5px;
  bottom: 8px;
  z-index: 100;
  background-color: transparent;
  opacity: 0;

  &.containsOpen {
    opacity: 1;
  }

  :global(.mosaic-window):hover & {
    opacity: 1;
  }
}

.magnify {
  position: absolute;
  bottom: 5px;
  left: 0;
  z-index: 102;
  opacity: 1;
  background-color: $dark3;
  display: none;
  .root:hover & {
    display: block;
  }
  &:global(.hoverScreenshot) {
    display: block;
  }
  svg {
    width: 16px;
    height: 16px;
    fill: white;
    float: left;
  }
  span {
    color: orange;
    float: right;
    padding-left: 3px;
  }
}

.zoomChart {
  position: absolute;
  bottom: 45px;
  left: 0;
  z-index: 102;
  opacity: 1;
  background-color: $dark3;
  width: 145px;
  border-radius: 4%;
  display: none;
  .root:hover & {
    display: block;
  }
  &:global(.hoverScreenshot) {
    display: block;
  }
}

.round {
  margin: 0;
  padding: 1px 5px 1px 5px;
  border-radius: 100%;
}

.borderBottom {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menuItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 12px;
}

.notInteractive {
  opacity: 0.5;
}
